"""
字符串的比较：基于ASCII码
"""

# abd 大于 abc
print(f"abd大于abc，结果为：{'abd' > 'abc'}")

# a大于A
print(f"a 大于 A，结果为：{'a' > 'A'}")

# ab大于a
print(f"ab大于a，结果为:{'ab' > 'a'}")

# key2大于key1
print(f"key2大于key1，结果为：{'key2' > 'key1'}")

# 获取字符的ASCII码值
print(f"字符a的码值为：{ord('a')}")
print(f"字符1的码值为：{ord('1')}")

# 根据ASCII码值获取字符
print(f"码值为99的字符为：{chr(99)}")
print(f"码值为49的字符为：{chr(49)}")
